<template>
  <mt-swipe :auto="4000">
    <mt-swipe-item  v-for="(item,index) in dataArray" :key="index">
      <router-link :to=item.href>
        <img :src=item.src alt="">
      </router-link>
    </mt-swipe-item>
  </mt-swipe>
</template>

<script>
  // import Vue from 'vue'
  // import { Swipe, SwipeItem } from 'mint-ui';
  // Vue.component(Swipe.name, Swipe);
  // Vue.component(SwipeItem.name, SwipeItem);
    export default {
        name: "swiper",
        data(){
          return {
            dataArray:[
              {'src':'https://photo.kkgold.com/photoserver/photo/2018/12/20/a515065e-fa59-4c69-8b6e-9de55de1cbf6.jpg','href':'/'},
              {'src':'https://photo.ssmall.com/photoserver/photo/2018/12/11/f41af95b-27e0-45fd-9a6e-bb5e32e5651d.jpg','href':'/'},
              {'src':'https://photo.ssmall.com/photoserver/photo/2018/12/24/56b99d29-2285-4ad4-8e87-043a8ad9f29a.jpg','href':'/'}
              ]
          }
        }
    }
</script>
<style scoped>
  .mint-swipe {
    height: 8.36rem;
  }
</style>
